﻿Imports VN.INS.DL.DALC
Imports VN.INS.BL.BE
Public Class Mantenimiento_MenuBC
    Public Function ListaMenu() As DataTable
        Dim ObjLMDA As Mantenimiento_MenuDA
        Dim ObjDt As DataTable

        Try
            ObjLMDA = New Mantenimiento_MenuDA
            ObjDt = ObjLMDA.ListaMenu()
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function ListaMenuBusca(ByVal stridmenu As String, ByVal strDescripcion As String) As DataTable
        Dim ObjLMDA As Mantenimiento_MenuDA
        Dim ObjDt As DataTable

        Try
            ObjLMDA = New Mantenimiento_MenuDA
            ObjDt = ObjLMDA.ListaMenuBusca(stridmenu, strDescripcion)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function


    Public Function ListaMenuPerfil() As DataTable
        Dim ObjLMPDA As Mantenimiento_MenuDA
        Dim ObjDt As DataTable

        Try
            ObjLMPDA = New Mantenimiento_MenuDA
            ObjDt = ObjLMPDA.ListaMenuPerfil()
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function ListaMenuPerfilBuscar(ByVal id_menu As String, ByVal menu_perfil As String, ByVal perfil As String) As DataTable
        Dim ObjLMPDA As Mantenimiento_MenuDA
        Dim ObjDt As DataTable

        Try
            ObjLMPDA = New Mantenimiento_MenuDA
            ObjDt = ObjLMPDA.ListaMenuPerfilBuscar(id_menu, menu_perfil, perfil)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Sub insertarmenu(ByVal IDMENU As String, ByVal DSC As String, ByVal PADRE As String, ByVal POSC As String, ByVal HAB As String, ByVal UR As String)
        Dim ObjIMP As Mantenimiento_MenuDA

        Try
            ObjIMP = New Mantenimiento_MenuDA
            ObjIMP.insertarmenu(IDMENU, DSC, PADRE, POSC, HAB, UR)

        Catch ex As Exception
            Throw ex
        End Try
    End Sub
   
    Public Sub editamenu(ByVal IDMENU As String, ByVal DSC As String, ByVal PADRE As String, ByVal POSC As String, ByVal HAB As String, ByVal UR As String)
        Dim ObjEM As Mantenimiento_MenuDA
        Try
            ObjEM = New Mantenimiento_MenuDA
            ObjEM.editarmenu(IDMENU, DSC, PADRE, POSC, HAB, UR)

        Catch ex As Exception
            Throw ex
        End Try

    End Sub

    Public Sub eliminarmenu(ByVal IDMENU As String)
        Dim ObjELM As Mantenimiento_MenuDA
        Try
            ObjELM = New Mantenimiento_MenuDA
            ObjELM.eliminarmenu(IDMENU)

        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub insertarmenuperfil(ByVal IDMN As String, ByVal MP As String, ByVal PF As String, ByVal EST As String)
        Dim ObjIMP As Mantenimiento_MenuDA
        Try
            ObjIMP = New Mantenimiento_MenuDA
            ObjIMP.insertarmenuperfil(IDMN, MP, PF, EST)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub editarmenuperfil(ByVal IDMN As String, ByVal MP As String, ByVal PF As String, ByVal EST As String)
        Dim ObjEMP As Mantenimiento_MenuDA
        Try
            ObjEMP = New Mantenimiento_MenuDA
            ObjEMP.editarmenuperfil(IDMN, MP, PF, EST)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public Sub eliminarmenuperfil(ByVal IDMP As String)
        Dim ObjEMP As Mantenimiento_MenuDA

        Try
            ObjEMP = New Mantenimiento_MenuDA
            ObjEMP.eliminarmenuperfil(IDMP)
        Catch ex As Exception
            Throw ex
        End Try
        
    End Sub
    Public Function ListaPerfil() As DataTable
        Dim Obdata As Mantenimiento_MenuDA
        Dim Objdt As DataTable

        Try
            Obdata = New Mantenimiento_MenuDA
            Objdt = Obdata.ListaPerfil()
            Return Objdt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function HMP(ByVal PADRE_ID As String, ByVal PERFIL As String) As DataTable
        Dim ObjHMPDA As Mantenimiento_MenuDA
        Dim ObjDt As DataTable

        Try
            ObjHMPDA = New Mantenimiento_MenuDA
            ObjDt = ObjHMPDA.HMP(PADRE_ID, PERFIL)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function PHM(ByVal PADRE_ID As String) As DataTable
        Dim ObjPHMDA As Mantenimiento_MenuDA
        Dim ObjDt As DataTable

        Try
            ObjPHMDA = New Mantenimiento_MenuDA
            ObjDt = ObjPHMDA.PHM(PADRE_ID)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function RMEMP(ByVal PADRE_ID As String) As DataTable
        Dim ObjRMEMPDA As Mantenimiento_MenuDA
        Dim ObjDt As DataTable

        Try
            ObjRMEMPDA = New Mantenimiento_MenuDA
            ObjDt = ObjRMEMPDA.RMEMP(PADRE_ID)
            Return ObjDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function
End Class
